1. Field of the Invention
The present invention relates to an image-pickup apparatus featuring an auto-white-balance-control technology and a white-balance control method provided therefor.
2. Description of the Related Art
In recent years, systems configured to automatically control white balance by using the output of an image-pickup element without using an external sensor have become the mainstream of auto-white-balance control systems used for a video camera. Japanese Patent Laid-Open No. 05-64219 has proposed a white-balance control device having the above-described configuration.
The white-balance control device that has been proposed by Japanese Patent Laid-Open No. 05-64219 obtains color-difference signals (R-Y and B-Y) and a luminance signal (Y) from color signals of red (R), green (G), and blue (B), and extracts the color-signal component corresponding to a color close to white from the luminance signal and the color signals. Further, the white-balance control device performs control so that the average of the extracted color signals becomes equal to the value of a white color (an achromatic color) determined to be the target.
Further, technologies for estimating the color temperature of the light source by using a chromatic color such as a flesh color in the case where the signal components corresponding to the color close to white are few in number in relation to the entire screen image have been available (e.g., refer to Japanese Patent Laid-Open No. 2003-333616).
Conventional technologies will be described next in detail with reference to FIG. 13.
FIG. 13 is a block diagram showing an exemplary image-pickup apparatus having a conventional white-balance control device.
In FIG. 13, an imaging system 1301 includes a lens configured to form a light flux of the subject into an image and an image-pickup element configured to perform photoelectric conversion for incident light. A luminance-and-color-signal generation unit 1302 converts a signal generated by the imaging system 1301 into a luminance signal (Y) and color signals (R, G, and B).
A luminance processing unit 1303 performs unsharp masking and/or gamma processing for the luminance signal. A white-balance amplification unit 1304 amplifies the color signals (R, G, and B) transmitted from the luminance-and-color-signal generation unit 1302 based on a white balance gain.
A color processing unit 1305 performs generation of color-difference signals (R-Y and B-Y), color-balance adjustment, and so forth. An output unit 1306 outputs an image signal. A white extraction unit 1307 extracts the signal corresponding to a color close to white from the image signal.
A chromatic-color extraction unit 1308 extracts the signal corresponding to a color close to a predetermined chromatic color from the image signal. A white-balance gain control unit 1309 determines the white balance gain of the white-balance amplification unit 1304 based on the result of the extraction performed by each of the white extraction unit 1307 and the chromatic-color extraction unit 1308.
Next, operations of the above-described system will be described.
The imaging system 1301 performs photoelectric conversion for light which is made incident through an optical system by using the image-pickup element and transmits the image signal to the luminance-and-color-signal generation unit 1302. The luminance-and-color-signal generation unit 1302 generates the luminance signal (Y) and the color signals (R, G, and B) based on the transmitted image signal, and transmits the luminance signal to the luminance processing unit 1303 and transmits the color signals to the white-balance amplification unit 1304.
The luminance processing unit 1303 performs the unsharp masking, the gamma processing, and so forth for the luminance signal. On the other hand, the white-balance amplification unit 1304 amplifies the color signals (R, G, and B) based on the white balance gain transmitted from the white-balance gain control unit 1309 which will be described later and transmits the amplified color signal to the color processing unit 1305.
The color processing unit 1305 generates the color-difference signals (R-Y and B-Y) based on the color signals (R, G, and B), performs color processing such as color-balance adjustment for the color-difference signals, and transmits the color-difference signals to the output unit 1306, the white extraction unit 1307, and the chromatic-color extraction unit 1308. The output unit 1306 externally transmits the luminance signal and the color-difference signals.
The white extraction unit 1307 extracts the signal corresponding to a color close to a white color based on the luminance signal (Y) and the color-difference signals (R-Y and B-Y).
FIG. 14A shows a white extraction range 1401 of which data is extracted as a white-color area. FIG. 14A shows a color-difference (R-Y and B-Y) plane and the white extraction range 1401 is the range of a color close to white (achromatic color).
The white extraction unit 1307 extracts a signal that is included in a predetermined luminance range and that is included in the white extraction range 1401. Further, the white extraction unit 1307 calculates the average of the extracted color signals (extracted-white-color average) and the amount of white-color signals obtained through white extraction (white-color amount), and transmits information about the extracted-white-color average and the white-color amount to the white-balance gain control unit 1309.
The chromatic-color extraction unit 1308 extracts the signal corresponding to a color close to a flesh color from the luminance signal (Y) and the color-difference signals (R-Y and B-Y).
FIG. 14B shows a flesh-color extraction range 1402 of which data is extracted as a flesh-color area.
The chromatic-color extraction unit 1308 extracts a signal that is included in a predetermined luminance range and that is included in a flesh-color extraction range 1402. Further, the flesh-color extraction unit 1308 calculates the average of the extracted color signals (extracted-flesh-color average) and the amount of extracted flesh-color signals (flesh-color amount), and transmits information about the extracted-flesh-color average and the flesh-color amount to the white-balance gain control unit 1309.
The white-balance gain control unit 1309 controls the white balance gain based on the result of the color-signal extraction performed by each of the white extraction unit 1307 and the chromatic-color extraction unit 1308.
FIG. 15 is a flowchart showing processing procedures performed by the white-balance gain control unit 1309 shown in FIG. 13 so as to calculate the white balance gain.
According to FIG. 15, it is determined whether the value of the white-color amount is greater than or equal to a predetermined threshold value at step S1501. That is to say, it is determined whether a white area large enough to control the white balance is included in an image. If the value of the white-color amount is greater than or equal to the threshold value, the processing advances to step S1503. If the value of the white-color amount is smaller than the threshold value, the processing advances to step S1502.
At step S1502, it is determined whether the white-balance control is performed based on the flesh-color signal when the image includes a small white-color amount. More specifically, it is determined whether the image includes a flesh-color amount large enough to control the white balance. If the value of the flesh-color amount is greater than or equal to a predetermined threshold value, the processing advances to step S1504. If the value of the flesh-color amount is smaller than the threshold value, the processing advances to step S1505.
At step S1503, the white balance gain is calculated based on the extracted-white-color average. More specifically, a white balance gain which brings the extracted-white-color average near to the target white (the origin point of the color-difference plane) is calculated.
FIG. 16A shows details of the white-balance-gain control attained based on the extracted-white-color average. FIG. 16A shows an extracted-white-color average 1601 and a point 1602, which is the origin point of the color-difference plane.
The white-balance gain control unit 1309 determines the white balance gain of a red (R) signal and a blue (B) signal so that the extracted-white-color average 1601 is brought near to the origin point (achromatic color) 1602 of the color-difference plane, and transmits information about the gain to the white-balance amplification unit 1304.
According to FIG. 16A, the white balance gain is determined so that the position of the extracted-white-color average 1601, which is shown in FIG. 16A, is brought near to the origin point 1602. Consequently, the gain of the red (R) signal is decreased and that of the blue (B) signal is increased.
At step S1504, the white balance gain is calculated based on the extracted-flesh-color average. More specifically, a white balance gain which brings the extracted-flesh-color average near to the target flesh-color value is calculated.
FIG. 16B shows details of the white-balance-gain control attained based on the extracted-flesh-color average. FIG. 16B shows an extracted-flesh-color average 1603 and a target flesh-color value 1604.
The white-balance gain control unit 1309 determines the white balance gain of a red (R) signal and a blue (B) signal so that the extracted-flesh-color average 1603 is brought near to a predetermined target flesh-color value, that is, the target flesh-color value 1604, and transmits information about the gain to the white-balance amplification unit 1304.
According to FIG. 16B, the white balance gain is determined so that the extracted-flesh-color average 1603, which is shown in FIG. 16B, is brought near to the target flesh-color value 1604. Consequently, the gain of the red (R) signal is decreased and that of the blue (B) signal is increased.
At step S1505, the currently used white balance gain is used, as it is, without calculating another white balance gain. The above-described processing is performed when the white-color area and the flesh-color area that are included in the image are too small to make a determination.
The white-balance amplification unit 1304 amplifies the color signals based on another white balance gain set for the photographed images corresponding to the next frame or later through the white-balance control unit 1309.
The above-described configuration allows for attaining the white-balance control through the use of information about a flesh color even though an image includes a small number of white-color signals, which makes it difficult to attain the white-balance control.
According to the above-described conventional technologies, information about a flesh color has been used when an image (screen image) includes a little amount of information about a color close to the white color. However, the image does not necessarily include information about the white color and/or the flesh-color information at all times. Further, if a subject image includes neither the information about the color close to the white color nor the flesh-color information, it becomes difficult to adjust the white balance.